<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
  </el-config-provider>
</template>

<script lang="ts" setup>
import { reactive, computed } from 'vue';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

const state = reactive({
  language: 'zh-cn'
})

const locale = computed(() => (state.language === 'zh-cn' ? zhCn : en))

</script>